package IC.AST.nodes;

import IC.AST.*;

/**
 * a return statement
 */
public class ReturnStmt extends Statement {
	private Expression expr;	// the return value

	/**
	 * @param expr the return value
	 * @param fileName TODO
	 * @param line the node line number
	 * @param column the node column number
	 */
	public ReturnStmt(Expression expr, String fileName, int line, int column) {
		super(fileName, line,column);
		this.expr = expr;
	}

	/**
	 * @return the return value
	 */
	public Expression getExpr() {
		return this.expr;
	}

	public <D,U> U accept(PropogatingVisitor<D,U> v, D context) throws Exception {
		return v.visit(this,context);
	}
}
